package myjava.regexp;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Root {

   public static void main(String[] args) {
      System.out.println("'?:\\s+|$)'".replaceAll(Pattern.quote("'?:\\s+|$)'"), "x"));
      Pattern p = Pattern.compile("(?<=('.{1,10000}))([ ]{1,})(?=(.{1,}'))");
      Matcher m = p.matcher("var x =   'hello world x '  ;");
      String res = m.replaceAll("*");
      System.out.println(res);
   }
}
